package com.itheima.exerciseTest.method20_29.method25;

public class Resource {
    // 创建钥匙
    private static final Object lock = new Object();

    // 创建票数
    private static int tickets;

    public Resource() {
        this(10);
    }
    public Resource(int tickets) {
        Resource.tickets = tickets;
    }

    public Object getLock() {
        return lock;
    }

    public int getTickets() {
        return tickets;
    }

    public void setTickets(int tickets) {
        Resource.tickets = tickets;
    }
}
